<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="strutsTags"%>
<%
	response.setHeader("Pragma", "No-cache");
	response.setHeader("Cache-Control", "no-cache");
	response.setDateHeader("Expires", 0);
%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<html>
	<base href="<%=basePath%>">
	<head>
		<script type="text/javascript"
			src="resource/js/configuration/overWorkType.js"></script>
	</head>
	<body>
		<table id="table_overtime_type" cellpadding="0" cellspacing="1"
			width="85%" class="tablesorter">
			<thead>
				<tr align="center">
					<th width="30%" nowrap="nowrap">
						加班种类名称
					</th>
					<th width="50%" nowrap="nowrap">
						加班种类描述
					</th>
					<th width="10%" nowrap="nowrap">
						加班酬劳
					</th>
					<th width="10%" nowrap="nowrap">
						最多累计小时数
					</th>
				</tr>
			</thead>
			<tbody id="tbody_overtime_type">
				<s:iterator value="allOtType">
					<tr id="<s:property value='otNo'/>" align="center">
						<td align="center">
							<s:property value="otName" />
						</td>
						<td align="center">
							<s:property value="otDesc" />
						</td>
						<td align="center">
							<s:property value="otHourRate.toString()" />
						</td>
						<td align="center">
							<s:property value="otOverLimit" />
						</td>
					</tr>
				</s:iterator>
			</tbody>
		</table>
		<div class="btnlink">
			<a style="cursor:hand;" id="link_add_overtime_type">新增</a>
			<a style="cursor:hand;" id="link_delete_overtime_type">删除</a>
			<a style="cursor:hand;" id="link_update_overtime_type">修改</a>
			<a style="cursor:hand;" id="link_sort_overtime_type">保存排序</a>
		</div>
		<br>
		<div id="dialog_overtime_type" title="加班种类设置"
			class="prompt_div_inline" style="width: 420;">
			<form id="overWorkTypeForm" method="post">
				<table class="prompt_div_body" width="100%">
					<tr>
						<td>
							加班种类名称
							<font color="red">*</font>:
						</td>
						<td class="errorMessage">
							<input id="otName" type="text" size="34" maxlength="64" />
							<label id="label_otName">
								&nbsp;
							</label>
						</td>
					</tr>
					<tr>
						<td>
							加班种类描述
							<font color="red">*</font>:
						</td>
						<td class="errorMessage">
							<s:textarea id="otDesc" cols="30" rows="6"
								onkeyup="if(this.value.length>128){this.value=this.value.substring(0, 128);}" />
							<label id="label_otDesc">
								&nbsp;
							</label>
						</td>
					</tr>
					<tr>
						<td>
							加班酬劳
							<font color="red">*</font>:
						</td>
						<td class="errorMessage">
							<s:select id="otHourRate" name="otHourRate" required="true"
								list="#{1.0:'1.0', 1.5:'1.5',2.0:'2.0',2.5:'2.5',3.0:'3.0'}" />
							<span>倍</span>
							<label id="label_otHourRate">
								&nbsp;
							</label>
						</td>
					</tr>
					<tr>
						<td>
							最多累计小时数:
						</td>
						<td class="errorMessage">
							<input id="otOverLimit" type="text" size="4" maxlength="3"
								onkeyup="value=value.replace(/[^0-9{\.}]/g,'')">
						</td>
					</tr>
					<tr>
						<td colspan="2" class="prompt_div_bottom">
							<input id="btn_add_overtime_type" class="button" type="button"
								value="新增" />
							<input id="btn_update_overtime_type" class="button" type="button"
								value="修改" />
							<input id="btn_overtime_type_close" class="button" type="button"
								value="取消" />
							<input type="hidden" id="otNo" />
						</td>
					</tr>
				</table>
			</form>
		</div>
		<script type="text/javascript">
	var config = {
		tableId :"table_overtime_type",
		tbodyId :"tbody_overtime_type",
		dialogId :"dialog_overtime_type",
		updateButton :"btn_update_overtime_type",
		addButton :"btn_add_overtime_type",
		addLink :"link_add_overtime_type",
		deleteLink :"link_delete_overtime_type",
		updateLink :"link_update_overtime_type",
		sortLink :"link_sort_overtime_type",
		closeButton :"btn_overtime_type_close"
	};
	overtimeTypeManager = new OvertimeTypeManager(config);
</script>
	</body>
</html>